<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../node_modules/react/umd/react.development.js"></script>
    <script src="../node_modules/react-dom/umd/react-dom.development.js"></script>
    <script src="../node_modules/babel-standalone/babel.min.js"></script>
</head>

<body>
    <div id="root"></div>
    <script type="text/babel">
        // function MyCom() {
        //     return (
        //         <div>劳资是一个组件</div>
        //     )
        // }

        class MyCom extends React.Component {
            // 所有的组件实例都可以通过其 mycom.render()方法得到一个JSX对象 作为组件的视图
            render() {
                return <div>劳资是一个类组件</div>
            }
        }

        ReactDOM.render(<MyCom />, document.querySelector("#root"))
    </script>
</body>

</html>